// 封装请求 get post
// 面向对象es6 promise 等等

// get
// new Promise =>  .then(接收正确结果) .catch(出现错误)
let listing = function(urling) {
	return new Promise((resolve, reject) => {
		uni.request({
			url: urling,
			method: 'GET'
		}).then(res => {
			resolve(res)
		}).catch(err => {
			reject(res)
		})
	})
}

export{listing}